#include <gtest/gtest.h>
#include <iostream>
#include "Monster.h"

TEST(Monstertest, MonsterHealth) 
{
    Monster monster;
    ASSERT_EQ(100, monster.getCurHealth());
    ASSERT_EQ(100, monster.getMaxHealth());
    ASSERT_EQ(monster.getCurHealth(), monster.getMaxHealth());
}

TEST(Monstertest, MonsterDamage)
{
    Monster monster;
    ASSERT_EQ(10, monster.getMinDamage());
    ASSERT_EQ(20, monster.getMaxDamage());
}

TEST(Monstertest, MonsterArmor)
{
    Monster monster;
    ASSERT_EQ(5, monster.getArmor());
}

TEST(Monstertest, MonsterSelector)
{
    Monster monster;
    {
        monster.monsterSelection(1);
        ASSERT_EQ(monster.getName(), "Dragon");
    }
    {
        monster.monsterSelection(2);
        ASSERT_EQ(monster.getName(), "Phoenix");
    }
    {
        monster.monsterSelection(3);
        ASSERT_EQ(monster.getName(), "Leviathan");
    }
    {
        monster.monsterSelection(4);
        ASSERT_EQ(monster.getName(), "Golem");
    }
    {
        monster.monsterSelection(5);
        ASSERT_EQ(monster.getName(), "Pegasus");
    }
    {
        monster.monsterSelection(6);
        ASSERT_EQ(monster.getName(), "Cerberus");
    }
}

TEST(Monstertest, MonsterCritDamage)
{
    Monster monster;
    ASSERT_EQ(1.5, monster.getCriticalStrikeMultiplier());
}

TEST(Monstertest, MonsterLevelUp) {
    Monster monster;
    monster.levelUp();
    ASSERT_EQ(1, monster.getLevel());
    ASSERT_LT(100, monster.getMaxHealth());
    ASSERT_LT(10, monster.getMinDamage());
    ASSERT_LT(20, monster.getMaxDamage());
    ASSERT_LT(5, monster.getArmor());
    ASSERT_LT(10, monster.getMaxExperience());
}

TEST(Monstertest, MonsterGainExperience)
{
    Monster monster;
    monster.gainExperience(5);
    ASSERT_EQ(5, monster.getExperience());
    monster.gainExperience(5);
    ASSERT_EQ(0, monster.getExperience());
}